<!DOCTYPE html>
<html>
<head>
<base href="{$site_url}/" />
<!-- Use IE7 mode -->
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>调箱平台-快速要箱</title>
<meta name="description" content="普捷通" />
<meta name="keywords" content="普捷通|要箱|集港|疏港" />
<script type="text/javascript">
	//<!CDATA[
	var SITE_URL = "{$site_url}";
	var REAL_SITE_URL = "{$real_site_url}";
	var PRICE_FORMAT = '{$price_format}';
	//
</script>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link href="{res file=css/base.css}" rel="stylesheet" type="text/css" />
<link href="{res file=css/index.css}" rel="stylesheet" type="text/css" />
<link href="{res file=css/jquery.datetimepicker.css}" rel="stylesheet"
	type="text/css" />
<script type="text/javascript" src="index.php?act=jslang"></script>
<script type="text/javascript" src="{lib file=jquery.min.js}"
	charset="utf-8"></script>
<script type="text/javascript" src="{lib file=base.js}" charset="utf-8"></script>
<script type="text/javascript"
	src="{lib file=jquery.datetimepicker.full.js}" charset="utf-8"></script>
<!--[if lt IE 10]>
<script type="text/javascript" src="{lib file=PIE.js}"></script>
<![endif]-->

<script type="text/javascript">
	(function($) {
		var oldHTML = $.fn.html;
		$.fn.formhtml = function() {
			if (arguments.length)
				return oldHTML.apply(this, arguments);
			$("input,textarea,button", this).each(function() {
				this.setAttribute('value', this.value);
			});
			$(":radio,:checkbox", this).each(function() {
				// im not really even sure you need to do this for "checked"
				// but what the heck, better safe than sorry
				if (this.checked)
					this.setAttribute('checked', 'checked');
				else
					this.removeAttribute('checked');
			});
			$("option", this).each(function() {
				// also not sure, but, better safe...
				if (this.selected)
					this.setAttribute('selected', 'selected');
				else
					this.removeAttribute('selected');
			});
			return oldHTML.apply(this);
		};

		//optional to override real .html() if you want
		// $.fn.html = $.fn.formhtml;
	})(jQuery);
	function checkedNum() {
		var num = 0;
		$("[id^='box_']").each(function() {
			if (this.checked) {
				num++;
			}
		});
		$("#itemcount").text(num);
	}

	function showsuc(sysmsg) {
		if (sysmsg) {
			$("#syss").text(sysmsg);
			$("#syss").slideDown();

			setTimeout(function() {
				$("#syss").slideUp();
			}, 2000);
		}
	}

	function showerror(sysmsg, id) {
		if (sysmsg) {
			$("#syse").text(sysmsg);
			$("#syse").slideDown();

			setTimeout(function() {
				$("#syse").slideUp();
			}, 2000);
		}
		if (id != undefined) {
			$("#" + id).addClass("form-item-error");
			$("#" + id).focus();
		}
	}
	var l = 1234567;
	$(function() {
		if (window.PIE) {
			$('.rounded').each(function() {
				PIE.attach(this);
			});
		}

		$("[id^='USE_DD_']").each(function() {
			$(this).datetimepicker({
				value : "{$d|date:Y/m/d H:00}",
				step : 10,
				lang : 'ch'
			});
		});

		$("a[id^='addrow_']").on("click", function() {
			var i = $(this).attr("i");
			copyrow(this, i);

		});
	});

	function copyrow(s, i) {
		l = l + 1;
		var row = $(s).parent().parent().formhtml();
		if (i != undefined && i != "" && i != null && row != undefined
				&& row != null && row != "") {
			row = row.replace(new RegExp(i, 'g'), l);
		}
		row = "<tr class=\"itemtr\">" + row + "<tr/>";
		$(s).parent().parent().after(row);

		$("#USE_DD_" + l).datetimepicker({
			step : 10,
			lang : 'ch'
		});

		$("#CUS_NON_" + l)
				.click(function() {
					$(this).removeClass("form-item-error");
				})
				.keydown(function() {
					$(this).removeClass("form-item-error");
				})
				.change(
						function() {
							var t = $(this);
							var i = t.attr("item");
							var v = t.val();
							if (v == undefined || v == null || v == "") {
								showerror("请输入有效的船公司", "CUS_NON_" + i);
								$("#CUS_NO_" + i).val("");
								return false;
							}
							var ajaxurl = '/index.php?app=plan&act=cus';
							$
									.ajax({
										type : 'post',
										url : ajaxurl,
										contentType : "application/x-www-form-urlencoded; charset=utf-8",
										data : {
											k : v
										},
										cache : false,
										error : function() {
											t.val("");
											$("#CUS_NO_" + i).val("");
											showDialog('网络繁忙，请稍后再试');
										},
										success : function(response) {
											if (response) {
												try {
													var obj = eval(response);

													if (obj.success) {
														t.val(obj.k);
														$("#CUS_NO_" + i).val(
																obj.c);
													} else {
														t.val("");
														$("#CUS_NO_" + i).val(
																"");
														showerror("请输入有效的船公司",
																"CUS_NON_"
																		+ item);
													}
												} catch (e) {
													t.val("");
													$("#CUS_NO_" + i).val("");
													showerror(obj.info);
												}

											}
										}
									});
						});
		$("#QTY_" + l).click(function() {
			$(this).removeClass("form-item-error");
		}).keydown(function() {
			$(this).removeClass("form-item-error");
		});
		$("#SHIP_OVOY_" + l).click(function() {
			$(this).removeClass("form-item-error");
		}).keydown(function() {
			$(this).removeClass("form-item-error");
		});
		$("#OVOY_" + l).click(function() {
			$(this).removeClass("form-item-error");
		}).keydown(function() {
			$(this).removeClass("form-item-error");
		});
		$("#TD_NO_" + l).click(function() {
			$(this).removeClass("form-item-error");
		}).keydown(function() {
			$(this).removeClass("form-item-error");
		});
		$("#USE_DD_" + l).click(function() {
			$(this).removeClass("form-item-error");
		}).keydown(function() {
			$(this).removeClass("form-item-error");
		});

		$("#box_" + l).click(function() {
			checkedNum();
		});

		$("a[id^='addrow_']").off("click");

		$("a[id^='addrow_']").on("click", function() {
			var ii = $(this).attr("i");
			copyrow(this, ii);

		});
	}
</script>
{$_head_tags}

<style>
.barleft {
	height: 700px;
	overflow: hidden;
}

.barright {
	overflow: auto;
	height: 720px;
	position: relative;
}

.searcharea {
	position: relative;
	padding: 7px;
	border: 1px solid #d6d6d6;
	border-radius: 30px;
	-moz-border-radius: 30px;
	-webkit-border-radius: 30px;
	margin-top: 0px;
}

.searcharea input {
	width: 250px;
}

.searcharea a {
	background: #3e7fc2;
	color: #fff;
	padding: 3px 8px;
	-moz-border-radius: 10px;
	-webkit-border-radius: 10px;
	border-radius: 10px;
}

.ship_item {
	margin-bottom: 20px
}

.tlist {
	width: 100%;
	font-size: 14px;
	background-color: #fff;
	text-align: center;
	border-spacing: 0;
	border: 1px solid #e7e7eb;
	border-left: 0;
	border-bottom: 0;
}

.tlist th {
	background: #f4f5f9;
	height: 40px;
	line-height: 40px;
	text-align: center;
	font-weight: normal;
	color: #222;
	border-bottom: 1px solid #e7e7eb;
	white-space: nowrap;
}

.tlist td {
	height: 50px;
	line-height: 50px;
	text-align: center;
	white-space: nowrap;
	color: #8d8d8d;
	border-bottom: 1px solid #e7e7eb;
}

.tlist input[type='checkbox'],#checkall {
	border: 0px;
	width: 18px;
	height: 18px;
	border: solid 1px #cfd1d3;
	vertical-align: middle;
}

.barright {
	padding: 20px 0
}

.w800 {
	width: 995px;
}

.itemtr select {
	border: 1px solid #e7e7eb;
	width: 70px;
	padding: 5px
}

.itemtr input[type='text'] {
	border: 1px solid #e7e7eb;
	padding: 0 5px;
	width: 40px;
	height: 28px;
	line-height: 28px;
	text-align: center;
}

.bbar {
	width: 995px;
	position: absolute;
	bottom: 0px;
	left: 0px;
	background: #f4f5f9;
	height: 50px;
}

.bbar a {
	display: block;
	height: 50px;
	line-height: 50px;
	background: #3e7fc2;
	width: 300px;
	color: #fff;
	font-size: 16px;
	text-align: center;
	float: right;
	text-decoration: none;
}

.bbar .c {
	float: left;
	height: 50px;
	line-height: 50px;
	margin-left: 20px;
	font-size: 16px;
}

.bbar .r {
	float: right;
	line-height: 50px;
	height: 50px;
	margin-right: 30px;
	font-size: 16px;
}

.bbar .r span {
	color: #ff6600
}

.form-item-error {
	border: solid 1px #e22 !important;
}

.btnsub {
	position: absolute;
	right: 0;
	bottom: 50px;
	background: #ff6600 !important;
	color: #fff;
}
</style>
</head>
<body>
	<div id="syss" class="syss rounded">操作成功</div>
	<div id="syse" class="syse rounded">操作失败</div>
	<div class="topbar">
		<div class="w">
			<div class="fr">
				<!--{if !$visitor.user_id}-->
				<a href="{url app=member&act=login&ret_url=$ret_url}"
					style="color: #C81623">请登录</a>
				<div class="spacer"></div>
				<a href="{url app=member&act=register&ret_url=$ret_url}">免费注册</a>
				<!--{else}-->

				欢迎您登陆!&nbsp;&nbsp;{$visitor.real_name|escape}

				<div class="spacer"></div>
				<a href="{url app=member&act=setpwd}">修改密码</a>
				<div class="spacer"></div>
				<a href="{url app=member&act=logout}">{$lang.logout}</a>
				<!--{/if}-->
			</div>

			<div class="cl"></div>
		</div>
	</div>
	<div style="position: relative;" class="submain">
		<div class="w">
			<div id="logoindex" class="fl">
				<a href="index.php"><img
					src="themes/mall/default/styles/default/images/logo1.png"> </a>
			</div>
			<ul class="navbar fr" style="position: relative;">
				<li><a href="index.php"><p>首页</p> </a>
				</li>
				<li><a class="on" href="index.php?app=sl&act=ofast"><p>集运</p>
				</a>
				</li>
				<li><a href="javascript:;"><p>堆场</p> </a>
				</li>
				<li><a href="javascript:;"><p>报关</p> </a>
				</li>
				<li><a href="javascript:;"><p>促销专区</p> </a>
				</li>
			</ul>
			<div class="cl"></div>
		</div>
		<div class="cl"></div>
	</div>
	<div class="w">
		<div class="fl w150 barleft">
			<ul class="navbarleft">
			<li><a href="index.php?app=sl&act=pfast">计划要箱</a></li>
				<li><a href="index.php?app=sl&act=ofast">一键要箱</a></li>
				<li><a href="index.php?app=plan&act=fast">快速要箱</a>
				</li>
				<li class="de"><a href="index.php?app=plan">订单确认</a>
				</li>
				<li class="kx"><a href="index.php?app=plan">空箱</a></li>
				<li class="zx"><a href="index.php?app=containerplan">重箱</a></li>
				<li><a href="index.php?app=plan&act=wl" class="on">查看物流</a></li>
				<li><a href="index.php?app=plan&act=fee">账单明细</a>
				</li>
				<li style="display: none"><a href="index.php?app=plan&act=fast">快速要箱</a>
				</li>
				<li style="display: none"><a href="index.php?app=usebox">状态查询</a>
				</li>
				<li style="display: none"><a href="index.php?app=plan&act=fang">放单查询</a>
				</li>
				<li style="display: none"><a
					href="index.php?app=plan&act=wsearch">提单查询</a>
				</li>
			</ul>
			<div class="cl"></div>
		</div>

		<div class="fl w800 barright">
			<div class="fr">
				<form id="form" method="get">
					<input name="app" value="plan" type="hidden" />
					<input name="act" value="wl" type="hidden" />
					<div class="searcharea rounded">
						<input type="search" name="k" placeholder="提单号"
							value="{$smarty.get.k}" /> <a
							href="javascript:$('#form').submit();" class="rounded">搜索</a>
					</div>
				</form>
				<div class="cl"></div>
			</div>
			<div class="cl"></div>
			<style>
.nk {
	background: url('/themes/mall/default/styles/11.png') no-repeat center
		center !important;
	width: 22px;
	height: 22px;
	margin: 0 auto;
	cursor: pointer;
}
.nkn {
	background: url('/themes/mall/default/styles/22.png') no-repeat center
		center;
	width: 22px;
	height: 22px;
	margin: 0 auto;
	cursor: pointer;
}

.blue {
	background: #3e7fc2;
	color: #fff !important;
}

.green {
	background: #6ccdb7;
	color: #fff !important;
}

.gray {
	background: #e7e7e7;
	color: #fff !important;
}

.subt td {
	border: none;
	font-size: 12px;
	    height: 30px;
    line-height: 30px;
}

.info div {
	float: left;
	height: 100%;
}

.info p {
	height: 30px;
	overflow: hidden;
	line-height: 20px;
	width: 130px;
}
.don{background: url('/themes/mall/default/styles/l1.png') no-repeat 55px
		center;}
.dnon{background: url('/themes/mall/default/styles/l7.png') no-repeat 55px
		center;}
.don8{background: url('/themes/mall/default/styles/l4.png') no-repeat center
		center;}
.dnon8{background: url('/themes/mall/default/styles/l3.png') no-repeat -52px
		center;}
.don1{background: url('/themes/mall/default/styles/l2.png') no-repeat -52px
		center;}
.don2{background: url('/themes/mall/default/styles/l5.png') no-repeat -52px
		center;}
.dnon1{background: url('/themes/mall/default/styles/l6.png') no-repeat -52px
		center;}
</style>
<script>
$(function(){
	
	$("[id^='tdl_']").click(function(){
		var n=$(this).attr("n");
		var c=$(this).attr("c");
		if(c==0){
			$("#trl_"+n).show();
			$(this).attr("c",1);
			$(this).addClass("nk");
		}else{
			$("#trl_"+n).hide();
			$(this).attr("c",0);
			$(this).removeClass("nk");
		}
	});
})
</script>
<table class="tlist" style="margin-top: 10px">
					<tr>
						<th style="width: 40px"></th>
						<th style="width: 200px">提单号</th>
						<th style="width: 125px">放单完成</th>
						<th style="width: 125px">拖车接单</th>
						<th style="width: 125px">空箱进场</th>
						<th style="width: 125px">空箱出场</th>
						<th style="width: 125px">重箱回场</th>
						<th style="width: 125px">集港完成</th>
					</tr>
					</table>
			<div style="height: 630px; overflow: auto;">
				{if $wl}
				<table class="tlist">
					
					{foreach from=$wl item=p name=i}
					<tr>
						<td style="width: 40px"><div class="nkn" id="tdl_{$p.td_no}" n="{$p.td_no}" c="0"></div>
						</td>
						<td style="width: 200px;text-align: left;">{$p.td_no}</td>
						<td style="width: 125px" class="blue">{$p.fd_qty}</td>
						<td style="width: 125px" class="blue">{$p.pc_qty}</td>
						<td style="width: 125px" class="blue">{$p.ei_qty}</td>
						<td style="width: 125px" class="blue">{$p.ec_qty}</td>
						<td style="width: 125px" class="green">{$p.tc_qty}</td>
						<td style="width: 125px" class="gray">{$p.jg_qty}</td>
					</tr>
					{if $p.sub}
					<tr id="trl_{$p.td_no}" style="display: none">
						<td></td>
						<td colspan="7">
							<table class="subt">
								{foreach from=$p.sub item=s}
								<tr>
									<td>{$s.box_no}</td>
									<td>{$s.xx}</td>
									<td class="info">
										<div class="{if $s.fd_dd}don{else}dnon{/if}">
											<p>放单</p>
											{if $s.fd_dd}{$s.fd_dd|date:Y/m/d H:i}{/if}
										</div>
										<div class="{if $s.pc_dd}{if $s.et_dd}don1{else}don2{/if}{else}dnon1{/if}">
											<p>派车</p>
											{if $s.pc_dd}{$s.pc_dd|date:Y/m/d H:i}{/if}
										</div>
										<div class="{if $s.et_dd}{if $s.ec_dd}don1{else}don2{/if}{else}dnon1{/if}">
											<p>空箱进场</p>
											{if $s.et_dd}{$s.et_dd|date:Y/m/d H:i}{/if}
										</div>
										<div class="{if $s.ec_dd}{if $s.tc_dd}don1{else}don2{/if}{else}dnon1{/if}">
											<p>集港接单</p>
											{if $s.ec_dd}{$s.ec_dd|date:Y/m/d H:i}{/if}
										</div>
										<div class="{if $s.tc_dd}{if $s.jg_dd}don1{else}don2{/if}{else}dnon1{/if}">
											<p>集港派车</p>
											{if $s.tc_dd}{$s.tc_dd|date:Y/m/d H:i}{/if}
										</div>
										<div class="{if $s.jg_dd}don8{else}dnon8{/if}">
											<p>任务完成</p>
											{if $s.jg_dd}{$s.jg_dd|date:Y/m/d H:i}{/if}
										</div>
									</td>
								</tr>
								{/foreach}
							</table>
						</td>
					</tr>
					{/if} {/foreach}
				</table>
				{else}
				<div class="datanone">
					<img src="n.png" / width="136">
				</div>
				{/if}
				<div class="cl"></div>
			</div>
		</div>
		<div class="cl"></div>
	</div>
	<div class="w">
		<div id="footer-2013" style="margin-top: 50px">

			<div class="copyright">
				Copyright&copy;2004-2020&nbsp;&nbsp;普捷通&nbsp;版权所有</div>
				<div style="width:300px;margin:0 auto;">
		 		<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31011502002931" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;"><img src="/themes/mall/default/ba.png" style="float:left;"/><p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">沪公网安备 31011502002931号</p></a>
		 	</div>
		</div>
	</div>
	<script type="text/javascript">
		seajs.use('/includes/libraries/javascript/fast.js', function(fast) {
			fast.init();
		});
	</script>
</body>
</html>